﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace Qreed.Windows.Forms
{
    /// <summary>
    /// Event arguments used by <see cref="WizardPage"/>.
    /// </summary>
    public class WizardPageEventArgs : CancelEventArgs
    {
        internal WizardPageEventArgs(WizardPage newPage)
        {
            NewPageName = newPage == null ? null : newPage.Name;
        }

        /// <summary>
        /// Gets or sets the new page.
        /// </summary>
        /// <value>The new page.</value>
        public string NewPageName { get; set; }
    }

    /// <summary>
    /// Event arguments used by <see cref="WizardPage"/>.
    /// </summary>
    public class WizardPageActivatedEventArgs : WizardPageEventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="WizardPageActivatedEventArgs"/> class.
        /// </summary>
        /// <param name="newPage">The new page.</param>
        /// <param name="buttons">The buttons.</param>
        internal WizardPageActivatedEventArgs(WizardPage newPage, WizardButtons buttons)
            : base(newPage)
        {
            Buttons = buttons;
        }

        /// <summary>
        /// Gets or sets the buttons.
        /// </summary>
        /// <value>The buttons.</value>
        public WizardButtons Buttons { get; set; }
    }

    /// <summary>
    /// Indicates one or a combination of wizard buttons.
    /// </summary>
    [Flags]
    public enum WizardButtons : int
    {
        /// <summary>
        /// Nothing.
        /// </summary>
        None = 0,
        /// <summary>
        /// The back button.
        /// </summary>
        Back = 1,
        /// <summary>
        /// The next button.
        /// </summary>
        Next = 2,
        /// <summary>
        /// The finish button.
        /// </summary>
        Finish = 4
    }
}
